from django.contrib import admin

# Register your models here.
from mock.models import Server, Api_Route, Response


class ServerAdmin(admin.ModelAdmin):
    list_display = ('name','path')
    search_fields = ('name','path')

class RouteAdmin(admin.ModelAdmin):
    list_display = ('name','path','server')
    search_fields = ('name','path')
    list_filter = ('server',)

class ResponseAdmin(admin.ModelAdmin):
    list_display = ('name','router','delay','json_result')
    search_fields = ('name','json_result')
    list_filter = ('router',)

admin.site.register(Server,ServerAdmin)
admin.site.register(Api_Route,RouteAdmin)
admin.site.register(Response,ResponseAdmin)